package c.c.b.b.d;

import android.graphics.Bitmap;
import android.os.Handler;
import android.os.Looper;
import android.widget.ImageView.ScaleType;
import c.c.b.b.f.o;
import c.c.b.b.f.p;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/* compiled from: ImageLoader */
public class k {
    public final ExecutorService a = Executors.newCachedThreadPool();
    public final o b;
    public int c = 50;
    public final b d;
    public final Map<String, a> e = c.b.a.a.a.k();
    public final Map<String, a> f = c.b.a.a.a.k();
    public final Handler g = new Handler(Looper.getMainLooper());

    /* compiled from: ImageLoader */
    public static class a {
        public p<Bitmap> a;
        public Bitmap b;
        public c.c.b.b.h.a c;
        public final List<c> d;

        public a(c.c.b.b.f.c<?> cVar, c cVar2) {
            List synchronizedList = Collections.synchronizedList(new ArrayList());
            this.d = synchronizedList;
            synchronizedList.add(cVar2);
        }
    }

    /* compiled from: ImageLoader */
    public interface b {
        Bitmap a(String str);

        String a(String str, int i, int i2, ScaleType scaleType);

        void a(String str, Bitmap bitmap);
    }

    /* compiled from: ImageLoader */
    public class c {
        public Bitmap a;
        public final d b;

        public c(k kVar, Bitmap bitmap, String str, String str2, d dVar) {
            this.a = bitmap;
            this.b = dVar;
        }
    }

    /* compiled from: ImageLoader */
    public interface d extends c.c.b.b.f.p.a<Bitmap> {
        void a();

        void a(c cVar, boolean z);

        void b();
    }

    public k(o oVar, b bVar) {
        this.b = oVar;
        if (bVar == null) {
            bVar = new a();
        }
        this.d = bVar;
    }

    public void a(String str, d dVar, int i, int i2) {
        this.a.execute(new f(this, str, dVar, i, i2, ScaleType.CENTER_INSIDE));
    }
}
